************************************************************************************
**  Replication code for "Fiscal Incentives for Conflict"
**  Notes: Table showing seletion of mines from the India Lease Directory into the mine sample (Table A18)
*************************************************************************************

global mines = "F:/Dropbox (ESOC - Princeton)/Public services and conflict in India/Mining"

* Users can create separate folders for graphs and table output, the standard setting is to save all output in the main directory.
global mytables "$mines/Restat_Repository"
global myfigures "$mines/Restat_Repository"

cd "$mines/Restat_Repository"

u "FINAL_Replication_Leases.dta", replace

gen log_area=log(area)

label var log_area "Log(mine area)"

estimates clear

*---------------------
* Table A18
*---------------------

eststo: reghdfe sample log_area yearexp , a(mineral) 
		estadd ysumm

eststo: reg sample log_area yearexp if inlist(mineral,"Iron Ore"), robust
		estadd ysumm

esttab using "$mytables/TableA18.tex", keep(log_area yearexp)  fragment nomtitles nonumbers  nowrap booktabs  nogaps  nolines eqlabels("") style(tex) wide label  replace starlevels(* 0.10 ** 0.05 *** 0.01) collabels(none) stats(ymean ysd N, labels("Mean DV" "Standard deviation" "Observations" ) fmt(3 3 0))  cells(b(star fmt(%9.5f)) se(par)) substitute((.) "" 0.000 "")
